import request from '@/utils/request'

/**
 * 新增
 */
export const sava=(param)=>{
  return request({
        url: '/QH/BatInfo/addBatInfo?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });

}
/**
 * 修改
 */
export const edit=(param)=>{
  return request({
        url: '/QH/BatInfo/editBatInfo?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });

}
/**
 * 分页
 */
export const list=(param)=>{
  return request({
        url: '/QH/BatInfo/selectBatInfoList?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        params: param
      });
}
/**
 * 分页
 */
export const list1=(param)=>{
  return request({
        url: '/QH/BatInfo/getBatInfoList?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });
}

/**
 * 电池类型
 */
export const btypelist=(param)=>{
  return request({
        url: '/QH/BatInfo/selectBatTypeList?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });
}

/**
 * 删除
 */
export const del=(param)=>{
  return request({
        url: '/QH/BatInfo/delBatInfo?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });
}
/**
 * 获取所有公司
 */
export const getcompany=(param)=>{
  return request({
        url: '/QH/company/getCompanyList?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });
}
/**
 * 获取部门
 */
export const getDepList=(param)=>{
  return request({
        url: '/QH/company/getDepList?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });
}

/**
 * 统计-电池数据分析
 */
export const getBatDetail=(param)=>{
  return request({
        url: '/QH/BatInfo/getBatDetail?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });
}
/**
 * 导出-电池数据分析
 */
export const exportBatRealTimeData=(param)=>{
  return request({
        url: '/QH/BatInfo/exportBatRealTimeData?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });
}

/**
 * 统计-电池充电分析
 */
export const getBatEvent=(param)=>{
  return request({
        url: '/QH/BatEvent/getBatEvent?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });
}
/**
 * 统计-电池充电分析-导出
 */
export const getBatEventExport=(param)=>{
  return request({
        url: '/QH/BatEvent/getBatEventExport?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });
}

/**
 * 统计-电池数据分析-显示
 */
export const viewBatRealTimeDataAll=(param)=>{
  return request({
        url: '/QH/BatInfo/viewBatRealTimeDataAll?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });
}
/**
 * 统计-电池数据分析-导出
 */
export const exportBatRealTimeDataAll=(param)=>{
  return request({
        url: '/QH/BatInfo/exportBatRealTimeDataAll?token='+window.localStorage.getItem('goods__token'),
        method: 'post',
        data: param
      });
}


